﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SqlSugar;

namespace Aioms.Model
{
    [SugarTable("permission")]
    public class Permission
    {
        public Permission()
        {
            this.Created = DateTime.Now;
            this.Updated = DateTime.Now;

        }

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        public long Id { get; set; }

        [SugarColumn(ColumnName = "name")]
        public string Name { get; set; }

        [SugarColumn(ColumnName = "type")]
        public string Type { get; set; } = "menu";

        [SugarColumn(ColumnName = "pid")]
        public long Pid { get; set; }

        [SugarColumn(ColumnName = "icon")]
        public string Icon { get; set; }

        [SugarColumn(ColumnName = "route")]
        public string Route { get; set; }

        [SugarColumn(ColumnName = "number")]
        public string Number { get; set; }

        [SugarColumn(ColumnName = "code")]
        public string Code { get; set; }

        [SugarColumn(ColumnName = "tag")]
        public string Tag { get; set; }

        [SugarColumn(ColumnName = "sortid")]
        public int Sortid { get; set; }

        [SugarColumn(ColumnName = "hidden")]
        public int Hidden { get; set; } = 0;

        [SugarColumn(ColumnName = "created")]
        public DateTime? Created { get; set; }

        [SugarColumn(ColumnName = "updated")]
        public DateTime? Updated { get; set; }
    }
}
